import VueRouter from 'vue-router'
// 导入路由组件
import Home from './components/tabBar/Home.vue'
import Other from './components/tabBar/Other.vue'
import Shopcar from './components/tabBar/Shopcar.vue'
import Myself  from './components/tabBar/Myself.vue'
import NewsList from './components/news/NewsList.vue'



// 3. 创建路由对象
var router = new VueRouter({
  routes: [ 
    {path:'/',redirect: '/home'},
    { path:'/home',component:Home },
    { path:'/other',component:Other },
    { path:'/shopcar',component: Shopcar },
    { path:'/myself',component:Myself },
    { path:'/home/newslist',component:NewsList},  
    // {path:'./header',components:Header},
    // {path:'./footer',components:Footer},
  ],
  linkActiveClass: 'mui-active' 
  // router-link-active
})

// 把路由对象暴露出去
export default router 